﻿using System;

namespace 案例2
{
    public class Student
    {
        public String no
        { get; set; }
        public String name
        { get; set; }

        public String sex
        { get; set; }

        public int age
        { get; set; }

        public Student()
        {
            Console.WriteLine("\t\t无参方法被调用\n");
        }

        public Student(String no, String name, String sex, int age)
        {
            this.no = no;
            this.name = name;
            this.sex = sex;
            this.age = age;
            Console.WriteLine("\t\t有参方法被调用\n");
        }

        public String print()
        {
            return "我是一名学生";
        }
    }
}
